import { RootState } from "../utils/store.type";
import { Module } from "vuex";

const aerographStatus: Module<any, RootState> = {
	namespaced: true,
	state: () => ({
		direction: 0,
		humidity: 0,
		pressure: 0,
		rainfall: 0,
		speed: 0,
		temperature: 0,
	}),

	mutations: {
		statusUpdate(state, payload) {
			// console.log(state,payload);
			const json = JSON.parse(payload);
			Object.assign(state, json);
		},
	},

};

export 	default aerographStatus;
